<?php

namespace App\Console\Commands;

use App\Models\MovCategory;
use App\Models\MovVideo;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema;

class MockCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'mock {action} {params}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $arguments = $this->arguments();
        if (isset($arguments['action'])) {
            switch ($arguments['action']) {
                //php artisan command:assist video "{\"table\":\"users\"}"
                case 'video':

                    MovCategory::query()->create(["name" => "cate1"]);
                    MovVideo::query()->create(["name" => "tag1"]);
                    break;
            }
        }
    }


}
